package com.chinaunicom.member.domain.model.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

/**
 * @author guomenghuai
 * @date 2024/1/8
 * @Description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UserLoginEntity {

    private String username;

    private String password;

    public void checkInit() {
        if (StringUtils.isBlank(username)) {
            throw new RuntimeException("用户名不能为空");
        }
    }
}
